﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using VideoCache.Server.Model;

namespace VideoCache.Server.MVCWeb.Areas.Admin.Models
{
    public class DictionaryListModel
    {
        public int total { get { return rows.Count; } }

        public List<DictionaryListItemModel> rows { get; set; }

        public DictionaryListModel()
        {
            rows = new List<DictionaryListItemModel>();
        }
    }

    public class DictionaryListItemModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int _parentId { get; set; }

        public DictionaryListItemModel(DictionaryInfo info)
        {
            this.Id = info.Id;
            this.Name = info.Name;
            this._parentId = info.ParentId;
        }
    }
}